/*
 *  atBudget Personal Finance Management application
 *
 *  Copyright 2011, Ilia Frenkel <frenkel.ilia@gmail.com>
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

/**
	Manage payees dialogue.
 */
Ext.define('ATB.view.payee.Manage', {
	extend: 'Ext.window.Window',
	alias : 'widget.payeemanage',

	title : 'Manage Payees',
	layout: 'fit',
	height: 500,
	width: 350,
	autoShow: true,
	resizable: true,
	modal: true,
	
	initComponent: function() {
		this.items = [{
				xtype: 'payeelist',
				tabIndex: 10,
				tbar: {
					style: {borderTop: 'none'},
					defaults: {
						iconAlign: 'left',
						minWidth: 60
					},
					items: [{
						text: 'Add',
						icon: 'res/img/icon-add16x16.gif',
						tabIndex: 20,
						action: 'addpayee'
					}, ' ', {
						text: 'Edit',						
						icon: 'res/img/icon-edit16x16.png',
						tabIndex: 30,
						action: 'editpayee',
						disabled: true
					},'-', {
						text: 'Remove',
						icon: 'res/img/icon-delete16x16.png',
						tabIndex: 40,
						action: 'deletepayee',
						disabled: true
					}]
				},
				preventHeader: true,
				border: false
		}];

		this.buttons = [{
				text: 'Close',
				tabIndex: 50,
				scope: this,
				handler: this.close
			}
		];

		this.callParent(arguments);
	}
});